<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <title>{% block title %}{% endblock %} - Polymer</title>
  <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/5.11.2/css/all.min.css">
  <link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
  <link href="{{ url_for('static', filename='css/mdb.min.css') }}" rel="stylesheet">
  <link href="{{ url_for('static', filename='css/style.min.css') }}" rel="stylesheet">
  {% block css %}{% endblock %}
  <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
</head>

<body>

<header>
 <nav class="navbar fixed-top navbar-expand-lg navbar-light white scrolling-navbar">
  <div class="container">

    <a class="navbar-brand waves-effect" href="{{ url_for('poly.index') }}" target="_blank">
      <strong class="blue-text">Polymer</strong>
    </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
      aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

        <div class="collapse navbar-collapse" id="navbarSupportedContent">
          <!-- Left -->
          <ul class="navbar-nav mr-auto">
            <li class="nav-item {% if request.endpoint and request.endpoint == 'poly.index' %}active{% endif %}">
              <a class="nav-link waves-effect" href="{{ url_for('poly.index') }}">首页
                <span class="sr-only">(current)</span>
              </a>
            </li>
            <li class="nav-item {% if request.endpoint and request.endpoint == 'poly.market' %}active{% endif %}">
              <a class="nav-link waves-effect" href="{{ url_for('poly.market') }}" target="_blank">订阅商城</a>
            </li>
            <li class="nav-item {% if request.endpoint and request.endpoint == 'poly.tutorial' %}active{% endif %}">
              <a class="nav-link waves-effect" href="{{ url_for('poly.tutorial') }}"
                target="_blank">使用流程</a>
            </li>
            <li class="nav-item {% if request.endpoint and request.endpoint == 'poly.about' %}active{% endif %}">
              <a class="nav-link waves-effect" href="{{ url_for('poly.about') }}" target="_blank">关于</a>
            </li>
          </ul>

          <!-- Right -->
          <ul class="navbar-nav nav-flex-icons">
            {% if current_user.is_authenticated %}
            <li class="nav-item dropdown">
                <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown"
                  aria-haspopup="true" aria-expanded="false">
                  欢迎回来，{{ current_user.username }}
                </a>
                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
                  <a class="dropdown-item" href="{{ url_for('auth.index') }}"><i class="fa fa-user mr-2"></i>个人中心</a>
                  <a class="dropdown-item" href="{{ url_for('auth.logout') }}"><i class="fa fa-sign-out-alt mr-2"></i>退出</a>
                </div>
              </li>
            {% endif %}
          </ul>
        </div>

  </div>
</nav>
</header>

<main class="mt-5 pt-5">
    <div class="container">
        {% block content %}<section></section>{% endblock %}
    </div>
</main>

{% block footer %}
<footer class="page-footer text-center font-small mdb-color darken-2 mt-4 wow fadeIn">
    <div class="pt-4">
      <a class="btn btn-outline-white" href="{{ url_for('user.sub_manage') }}" target="_blank" role="button">管理订阅
        <i class="fas fa-bell ml-2"></i>
      </a>
      <a class="btn btn-outline-white" href="{{ url_for('poly.suggestion') }}" target="_blank" role="button">提交订阅
        <i class="fas fa-paper-plane ml-2"></i>
      </a>
    </div>
    <hr class="my-4">

    <div class="footer-copyright py-3"> © 2020 Copyright 聚合热点资讯 高效阅读 永久免费</div>
</footer>
{% endblock %}

<script type="text/javascript" src="{{ url_for('static', filename='js/jquery-3.4.1.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/popper.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/mdb.min.js') }}"></script>
{% block js %}{% endblock %}
<script type="text/javascript">new WOW().init();</script>

</body>

</html>
